import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);
const router = new Router({
    routes: [
        {
            path: '/',
            redirect: '/home'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: 'system' },
            children: [
                {
                    path: '/home',
                    component: () => import(/* webpackChunkName: "home" */ '../views/index/index.vue'),
                    meta: { title: '系统首页'}
                },
                {
                    path: '/guize',
                    component: () => import(/* webpackChunkName: "user_manage" */ '../views/manage/Baodaoguize.vue'),
                    meta: { title: '学院管理'}
                },
                {
                    path: '/baodao',
                    component: () => import(/* webpackChunkName: "user_manage" */ '../views/manage/Fabubaodao.vue'),
                    meta: { title: '发布报道'}
                },
                {
                    path: '/zhiyin',
                    component: () => import(/* webpackChunkName: "counsel_manage" */ '../views/manage/Jiaotongzhiyin.vue'),
                    meta: { title: '交通指引'}
                },
                {
                    path: '/zhiyuanzhe',
                    component: () => import(/* webpackChunkName: "news_manage" */ '../views/manage/Zhiyuanzhexinxi.vue'),
                    meta: { title: '志愿者信息' },
                },
                {
                    path: '/tongji',
                    component: () => import(/* webpackChunkName: "news_manage" */ '../views/manage/Baodaotongji.vue'),
                    meta: { title: '报道统计'},
                },
                {
                    path: '/shenhe',
                    component: () => import(/* webpackChunkName: "news_manage" */ '../views/manage/Zaixianshenhe.vue'),
                    meta: { title: '在线审核'},
                },
                /* 学生板块路由组件 */
                {
                    path: '/zhinan',
                    component: () => import(/* webpackChunkName: "news_manage" */ '../views/student/Yuanxizhinan.vue'),
                    meta: { title: '院系指南'},
                },
                {
                    path: '/xinxi',
                    component: () => import(/* webpackChunkName: "news_manage" */ '../views/student/Gerenxinxi.vue'),
                    meta: { title: '个人信息采集'},
                },
                {
                    path: '/jiaofei',
                    component: () => import(/* webpackChunkName: "news_manage" */ '../views/student/Jiaotong.vue'),
                    meta: { title: '在线缴费'},
                },
                {
                    path: '/sushe',
                    component: () => import(/* webpackChunkName: "news_manage" */ '../views/student/Chakansushe.vue'),
                    meta: { title: '在线查看宿舍'},
                },
                {
                    path: '/lianxi',
                    component: () => import(/* webpackChunkName: "news_manage" */ '../views/student/Lianxizhiyuanzhe.vue'),
                    meta: { title: '联系志愿者'},
                },
                {
                    path: '/dayin',
                    component: () => import(/* webpackChunkName: "news_manage" */ '../views/student/Zaixiandayin.vue'),
                    meta: { title: '报道单自助打印'},
                },
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                },
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '/register',
            component: () => import(/* webpackChunkName: "register" */ '../components/page/Register.vue'),
            meta: { title: '注册' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
export default router